using System;
using System.Collections.Generic;

namespace SharpFastCGI.Internals
{
	/// <summary>
	/// An object processing FastCGI records.
	/// </summary>
	/// <remarks>
	/// Object references passed through arguments should not be used after the method has returned.
	/// </remarks>
	internal interface IRecordHandler
	{
		void GetValues(ushort RequestId, IEnumerable<string> Keys);
		void BeginRequest(ushort RequestId, BeginRequestFlags Flags, Role Role);
		void AbortRequest(ushort RequestId);
		void Params(ushort RequestId, string Key, string Value);
		void Params_EndOfStream(ushort RequestId);
		void Data(ushort RequestId, int Length, InputStream Data);
		void Data_EndOfStream(ushort RequestId);
		void Stdin(ushort RequestId, int Length, InputStream Stdin);
		void Stdin_EndOfStream(ushort RequestId);
		void Unknown(ushort RequestId, byte RecordType);
	}
}
